package 复习;

import java.util.Vector;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class 多线程的3种实现方式 {
    public static void main(String[] args) {

        new Thread(() -> {
            System.out.println("线程的第一种实现");
        }).start();

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("线程第二种实现");
            }
        }).start();

        new Thread(new FutureTask<String>(new Callable<String>() {
            @Override
            public String call() throws Exception {
                System.out.println("线程第三种实现");
                return "shibixiu";
            }
        })).start();

    }
}
